/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class FichaDetachedCriteria extends AbstractORMDetachedCriteria {
	public final StringExpression diagnostico;
	public final DateExpression fecha;
	public final IntegerExpression id;
	
	public FichaDetachedCriteria() {
		super(orm.Ficha.class, orm.FichaCriteria.class);
		diagnostico = new StringExpression("diagnostico", this.getDetachedCriteria());
		fecha = new DateExpression("fecha", this.getDetachedCriteria());
		id = new IntegerExpression("id", this.getDetachedCriteria());
	}
	
	public FichaDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.FichaCriteria.class);
		diagnostico = new StringExpression("diagnostico", this.getDetachedCriteria());
		fecha = new DateExpression("fecha", this.getDetachedCriteria());
		id = new IntegerExpression("id", this.getDetachedCriteria());
	}
	
	public PrestacionDetachedCriteria createPrestacionCriteria() {
		return new PrestacionDetachedCriteria(createCriteria("prestacion"));
	}
	
	public PacienteDetachedCriteria createPacienterutCriteria() {
		return new PacienteDetachedCriteria(createCriteria("pacienterut"));
	}
	
	public Ficha uniqueFicha(PersistentSession session) {
		return (Ficha) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Ficha[] listFicha(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Ficha[]) list.toArray(new Ficha[list.size()]);
	}
}

